import java.io.File;
import java.io.IOException;

public class iotest {
    public static void main(String[] args) throws IOException {
        File file=new File("D:\\WeGame\\Download\\2.txt");
        System.out.println(file.length());//文件长度 大小
        System.out.println(file.exists());//
        System.out.println(file.isFile());
        System.out.println(file.isAbsolute());
        System.out.println(file.getAbsoluteFile());
        System.out.println(file.isDirectory());
        System.out.println(file.getAbsolutePath());
        System.out.println(file.getName());
        System.out.println(file.createNewFile());
        System.out.println(file.delete());
        file=new File("D:\\WeGame\\Download\\a");
        System.out.println(file.mkdir());
        file=new File("D:\\WeGame\\Download\\m\\n\\q");
        System.out.println(file.mkdirs());
        System.out.println(file.delete());

    }
}
